package cn.ymkj.controller;

import cn.ymkj.pojo.Menu;
import cn.ymkj.service.MenuService;
import cn.ymkj.vo.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "菜单相关请求的接口")
@RestController
@RequestMapping("/menu")
public class MenuController {
    @Resource
    private MenuService menuService;
    
    @GetMapping("/findAll")
    public R findAll(){
        List<Menu> menuList = menuService.findAll();
        return R.ok("获取所有菜单成功",menuList);
    }

    @GetMapping("/getMenuById")
    public Menu getMenuById(Integer id){
        return new Menu();
    }

}
